#ifndef MARQUEE_H
#define MARQUEE_H
#include <QWidget>
#include <QFile>
#include <QTextStream>
#include <QPainter>

class Marquee : public QWidget
{
	Q_OBJECT
public:
    Marquee(QWidget *parent = 0);
    void setText(const QString &newText);
    QString text() const { return myText; }
    QSize sizeHint() const;
    void stop();
    void start();

public slots:
	void fromFile(const QString & filename);
protected:
    void paintEvent(QPaintEvent *event);
    void timerEvent(QTimerEvent *event);
    void showEvent(QShowEvent *event);
    void hideEvent(QHideEvent *event);
private:
    QString myText;
    int offset;
    int myTimerId;
};
#endif